home *** CD-ROM | disk | FTP | other *** search
/ ASP Advantage 1994 2nd Q2 / The Association of Shareware Professionals - The Official ASP Advantage (2nd Quarter)(1994).bin / files / progming / bt / dice.bas < prev    next >
Encoding:
BASIC Source File  |  1992-10-05  |  576 b   |  10 lines

  1.  1 ' dice.bas
  2. 10 pts = 0                                                          
  3. 20 die.roll = int(rnd*6) + 1 ' random number bet 1 and 6            
  4. 30 while die.roll <> 6 and pts < 20                                 
  5. 40    pts = pts + die.roll                                          
  6. 50    die.roll = int(rnd*6) + 1                                     
  7. 60 wend                                                             
  8. 70 if die.roll = 6 then pts = 0                                     
  9. 80 if pts>0 then print "You made";pts;"points" else print"You lost" 
  10.